/**
 * Aqualife.java
 * Create an abstract class called Aqualife.
 *
 * Aqualife has the following attributes ; name, age, lake-fish or ocean-fish.
 * Aqualife defines 2 abstract methods called eat() and procreates().
 * A third concrete method called Breathes() displays:
 * ‘These creatures breathe from gills.’
 *
 *  @author  John Thomason
 *    Date:  Nov 22, 2008
 *  Course:  CS222 Java II
 * Seminar:  3
 *  Assign:  Mid Term Exam
 */


/**
 * Aqualife Class
 */
public abstract class Aqualife {

//INSTANCE VARIABLES

    protected enum FishType { LAKE, OCEAN };
    protected String  name;
    protected Integer age;


//CONSTRUCTORS

    /**
     * Aqualife()
     * Only here to provide default values incase something goes wrong.
     * This Constructor should never be used!
     */
    public Aqualife(){
        this("",0);
    }

    /**
     * Aqualife(String,Integer)
     * This constructor should be normally used.
     *
     * @param name  The name of the creature
     * @param age   The age of the creature
     */
    public Aqualife(String name, Integer age){
        setName(name);
        setAge(age);
    }


//ABSTRACT METHODS

    /**
     * eat();
     * What does this creature eat?
     *
     * @return  What the creature eats as a string
     */
    public abstract String eat();

    /**
     * procreates();
     * What does this creature spawn?
     *
     * @return  What the creature spawns as a string
     */
    public abstract String procreates();


//CONCRETE METHODS

    /**
     * breathes();
     * How does this creature breathe.
     *
     * @return  The breathe string
     */
    public String breathes(){
      return String.format("These creatures (%s) breathe from gills.", 
                                          getName());
    }

    /**
     * prt(String);
     * Display a formatted message string
     *
     * @param msg   The formatted message string
     */
    public void prt(String msg){
      System.out.print(msg);
    }


//SETTERS

    /**
     * setName(String);
     * Save the name of the aqualife creature
     *
     * @param name  The name of the creature
     */
    public void setName(String name){
      this.name = name;
    }//setName()

    /**
     * setAge(Integer);
     * Save the age of the aqualife creature
     *
     * @param age   The integer age of the creature
     */
    public void setAge(Integer age){
      this.age = age;
    }//setAge()


//GETTERS

    /**
     * getName();
     * Get the name of the creature
     *
     * @return  The creatures name
     */
    public String getName(){
      return name;
    }//getName()

    /**
     * getAge();
     * Get the age of the creature
     *
     * @return  The creatures integer age
     */
    public Integer getAge(){
      return age;
    }//getAge()

}//End Aqualife Class
